package com.gopay.common.constants.cust;

import java.util.ArrayList;
import java.util.List;

public enum CustInfoAuditEnum {
	
	CORP_NAME("corp_name","企业名称"),
	BUSINESS_LICENSE_NO("business_license_no","营业执照代码"),
	ORGANIZATION_CODE("organization_code","组织机构代码"),
	BUSINESS_TERM("business_term","营业期限"),
	CORP_ADDR("corp_addr","通讯地址"),
	LEGAL_PERSON_NAME("legal_person_name","法人姓名"),
	LEGAL_PERSON_CERT_TYPE("legal_person_cert_type","法人证件类型"),
	LEGAL_PERSON_CERT_NO("legal_person_cert_no","法人证件号码"),
	LEGAL_PERSON_CERT_TERM("legal_person_cert_term","法人证件有效期"),
	//添加法人联系电话 add by pansc 20170427
	LEGAL_PERSON_MOBILE("legal_person_mob","法人手机号码"),
	EMAIL_C("email_c","邮箱地址"),
	CORP_TEL("corp_tel","联系电话"),
	CUST_MOB_C("cust_mob_c","手机号码"),
	GOPAY_MCC_PROVINCE("gopay_mcc_province","通信地址省市"),
	GOPAY_MCC_CITY("gopay_mcc_city","通信地址城市"),
	CUST_NAME("cust_name","客户姓名"),
	CERT_TYPE("cert_type","证件类型"),
	CERT_NO("cert_no","证件号码"),
	CERT_TERM("cert_term","证件有效期"),
	EMAIL_P("email_p","邮箱地址"),
	CUST_MOB_P("cust_mob_p","手机号"),
	
	BUSINESS_LICENSE_SCOPE("business_license_scope","营业执照经营范围"),
	CORP_PROVINCE_CODE("corp_province_code","营业执照注册地省份"),
	CORP_CITY_CODE("corp_city_code","营业执照注册地城市"),
	BUSINESS_LICENSE_REGISTER_ADDR("business_license_register_addr","营业执照注册地详情"),
	REGISTERED_CAPITAL("registered_capital","注册资本"),
	CORP_CONTACT("corp_contact","企业联系人"),
	CONTACT_TEL("contact_tel","联系人手机号"),
	ACTUAL_CONTROLLER_NAME("actual_controller_name","实际控制人姓名"),
	ACTUAL_CONTROLLER_CERT_TYPE("actual_controller_cert_type","实际控制人证件类型"),
	ACTUAL_CONTROLLER_CERT_NO("actual_controller_cert_no","实际控制人证件号码"),
	ACTUAL_CONTROLLER_CERT_TERM("actual_controller_cert_term","实际控制人证件有效期"),
	GOPAY_MCC_CLASS("gopay_mcc_class","行业分类"),
	GOPAY_MCC_CODE("gopay_mcc_code","行业分类子类"),
	
	CORP_STAT("corp_stat","客户状态"),
	SMS_AC_LOCK_STAT("sms_ac_lock_stat","短信验证密码状态"),
	IS_REAL_NAME_CERTIFY("is_real_name_certify","实名认证"),
	CORP_PRIVILEGE("corp_privilege","客户等级"),
	IS_MER_CHANT("is_mer_chant","是否商户"),
	SHOW_TOKEN("show_token","是否动态口令登陆"),
	SHOW_CA("show_ca","是否展示数字证书"),
	SMS_AC_DISPLAY("sms_ac_display","是否展示短信认证"),
	SHOW_CORP_FUND("show_corp_fund","是否展示商财通"),
	BALANCE_WARNING_CONFIG("balance_warning_config","是否展示余额预警"),

	MER_NAME("mer_name","网关商户名称"),
	WEBSITE_URL("website_url","网关商户网址"),
	IS_MARKET("is_market","G商银通"),
	MARKET_NAME("market_name","交易市场名称"),
	MARKET_URL("market_url","交易市场网址"),
	IS_P2P("is_p2p","G商融通"),
	PLATFORM_NAME("platform_name","G商融通平台名称"),
	PLATFORM_URL("platform_url","G商融通平台网址"),
	BANK_SUPERVISE_ID("bank_supervise_id","G商融通托管银行"),
	CORP_TYPE("corp_type","G商融通平台性质"),
	FUND_PLATFORM("fund_platform","基金平台"),
	FUND_PLATFORM_NAME("fund_platform_name","基金平台名称"),
	FUND_PLATFORM_URL("fund_platform_url","基金平台网址"),
	FUND_ORG_NO("fund_org_no","基金公司机构代码"),
	CROSS_BORDER("cross_border","跨境"),
	CB_CORP_NAME("cb_corp_name","跨境客户英文名称"),
	CB_CORP_URL("cb_corp_url","跨境公司网址"),
	EBP_CODE("ebp_code","跨境电商平台代码"),
	EBP_NAME("ebp_name","跨境电商平台名称"),
	CB_LINKMAN_NAME("cb_linkman_name","跨境_联系人"),
	CB_LINKMAN_TEL("cb_linkman_tel","跨境_联系电话"),
	ISBONDED("is_bonded","是否保税"),
	TRADE_CODE("trade_code","跨境交易编码"),
	TRADE_DESC("trade_desc","跨境交易附言"),
	CONTRACT_TS("contract_ts","签约日期"),
	IS3DCHECK("is_3DCheck","是否开通3D验证"),
	INTLMERCHANTID("intl_merchant_id","外卡商户号"),
	MODEL3DINTLMERCHANTID("model_3d_intl_merchant_id","3D模式外卡商户号"),

	IS_DFSA("is_dfsa","资金存管产品"),
	CORP_SHORT_NAME("corp_short_name","企业简称"),
	POST_CUSTOMS("post_customs","跨境报送海关"),

	DEFAULT_DRAW_ACCT_NAME("default_draw_acct_name","开户名");

	
	private final String code;
	private final String desc;


	CustInfoAuditEnum(String code,String desc){
		this.code = code;
		this.desc = desc;
	}

	public static String getCustType(String code){
		if (CUST_NAME.getCode().equals(code) || CERT_TYPE.getCode().equals(code) || CERT_NO.getCode().equals(code) ||
				CERT_TERM.getCode().equals(code) || EMAIL_P.getCode().equals(code) || CUST_MOB_P.getCode().equals(code)){
			return UserInfoConstants.USER_TYPE_PERSON;
		}else{
			return UserInfoConstants.USER_TYPE_CORP_ADMIN;
		}
	}
	
	public static String getNameByCode(String code){
		for (CustInfoAuditEnum item : CustInfoAuditEnum.values()) {
			if (item.getCode().equals(code.trim())) {
				return item.getDesc();
			}
		}
		return "";
	}
	
	public static List<String> getList(){
		List<String> list = new ArrayList<String>();
		for (CustInfoAuditEnum item : CustInfoAuditEnum.values()) {
			list.add(item.getCode());
		}
		return list;
	}
	
	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
}
